<!DOCTYPE html>
<html>
<head lang="en">
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible"content="IE=8"><!--以IE8模式渲染-->
	<meta http-equiv="X-UA-Compatible"content="IE=7"><!--以IE7模式渲染-->
	<meta http-equiv="X-UA-Compatible"content="IE=9; IE=8; IE=7; IE=EDGE">
	<title>百朋后台管理系统</title>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/demo.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/public.css">
    <script type="text/javascript" src="__PUBLIC__/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/common.js?a=2"></script>
    <script type="text/javascript" src="__PUBLIC__/js/ajax.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/vue/dist/vue.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/vue/dist_resource/vue-resource.js"></script>
    <style>
        .btn{
            padding: 2px 15px;
        }
    </style>
    <script type="text/javascript">
        var borrow_id='{$borrow_id}';
    </script>
</head>
<body>
<div id="dcWrap">
    <div id="dcMain"> <!-- 当前位置 -->
        <div id="index" class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
            <div id="douApi"></div>
            <input type="hidden" id="cust_id" value="<?php echo $cust_id;?>">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="indexBoxTwo">
                <tr>
                    <td width="65%" valign="top" class="pr">
                        <div class="indexBox" id="main_form">
                            <div class="boxTitle">分期订单详情</div>
                            <ul>
                                <table width="100%" border="0" cellspacing="0" cellpadding="7" class="tableBasic">
                                    <tr>
                                        <td width="100">分期编号：</td>
                                        <td><strong>{{borrow_json.borrow_id}}</strong></td>
                                        <td width="120">分期标题：</td>
                                        <td><strong>{{borrow_json.borrow_title}}</strong></td>
                                    </tr>
                                    <tr>
                                        <td>客户ID：</td>
                                        <td><strong>{{borrow_json.borrow_custid}}</strong></td>
                                        <td>客户姓名：</td>
                                        <td><strong>{{borrow_json.cust_name}}<a href="javascript:;" @click="goto_cust()" class="cueRed ml">（点击跳转）</a></strong></td>
                                    </tr>
                                    <tr>
                                        <td>分期金额：</td>
                                        <td><strong>{{borrow_json.borrow_money}}</strong><a href="" class="cueRed ml">（点击修改）</a></td>
                                        <td>首付金额：</td>
                                        <td><strong>{{borrow_json.fac_payment}}</strong></td>
                                    </tr>
                                    <tr>
                                        <td>分期利率：</td>
                                        <td><strong>{{borrow_json.borrow_rate}}</strong><a href="" class="cueRed ml">（点击修改）</a></td>
                                        <td>分期期限：</td>
                                        <td><strong>{{borrow_json.borrow_loanperiod}}</strong></td>
                                    </tr>
                                    <tr>
                                        <td>延期月份：</td>
                                        <td><strong>{{borrow_json.delay_time}}</strong><a href="" class="cueRed ml">（点击修改）</a></td>
                                        <td>延期金额：</td>
                                        <td><strong>{{borrow_json.delay_money}}</strong></td>
                                    </tr>
                                    <tr>
                                        <td>服务费：</td>
                                        <td><strong>{{borrow_json.service_money}}</strong><a href="" class="cueRed ml">（点击修改）</a></td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td>申请时间：</td>
                                        <td><strong>{{borrow_json.borrow_createdate}}</strong></td>
                                        <td>复审通过时间：</td>
                                        <td><strong>{{borrow_json.borrow_passtime}}</strong></td>
                                    </tr>
                                    <tr>
                                        <td>商户名称：</td>
                                        <td><strong>{{borrow_json.fac_name}}</strong></td>
                                        <td>商户员工：</td>
                                        <td><strong>{{borrow_json.facp_name}}</strong></td>
                                    </tr>
                                </table>
                            </ul>
                        </div>
                    </td>
                    <td valign="top" class="pl">
                        <div class="indexBox">
                            <div class="boxTitle">期限选择</div>
                            <ul>
                                <table width="100%" border="0" cellspacing="0" cellpadding="7" class="tableBasic">
                                    <tbody>
                                    <template v-for="(period, index) in period_array">
                                        <template v-if="index%3==0"><tr></template>
                                        <td style="width:50px;text-align: left;">
                                            <input type="radio" v-model="period_check" v-bind:value="period"> &nbsp;{{period.dateslip}}
                                            <span v-if="period.state==1" style="color:green">(确定选择)</span>
                                            <span v-else-if="period.state==0" style="color:orange">(客户选择)</span>
                                            <span v-else-if="period.state==2" style="color:red">(未选择)</span>
                                        </td>
                                        <template v-if="index%3==2"></tr></template>
                                    </template>
                                    <tr>
                                        <td colspan="4" style="text-align: center"><input type="button" class="btn" value="保存" @click="submit_period();">
                                        </td></tr></tbody></table>
                            </ul>
                        </div>
                        <div class="indexBox">
                            <div class="boxTitle">审核资料选择</div>
                            <ul>
                                <table width="100%" border="0" cellspacing="0" cellpadding="7" class="tableBasic">
                                    <tbody>
                                    <template v-for="(data, index) in data_array">
                                        <template v-if="index%2==0"><tr></template>
                                            <td style="width:100px;text-align: left;" >
                                                <input type="checkbox" v-model="data.checked" v-bind:true-value="1" v-bind:false-value="0" v-bind:value="data.state"> &nbsp;{{data.data_name}}
                                                <span v-if="data.state==1" style="color:blue">(需填写资料)</span>
                                                <span v-else-if="data.state==0" style="color:green">(已完善资料)</span>
                                                <span v-else-if="data.state==2" style="color:red">(后台取消)</span>
                                                <span v-else-if="data.state==4" style="color:orange">(无需填写)</span>
                                            </td>
                                        <template v-if="index%2==1"></tr></template>
                                    </template>
                                    <tr>
                                        <td colspan="3" style="text-align: center"><input type="button" class="btn" value="保存" @click="submit_data();">
                                        </td></tr></tbody></table>
                            </ul>
                        </div>
                    </td>
                </tr>
            </table>
            <div class="indexBox">
                <div class="boxTitle">分期审核材料</div>
                <ul>
                    <table width="100%" border="0" cellspacing="0" cellpadding="7" class="tableBasic">
                        <tr>
                            <td width="120" valign="top">借款审核状态：</td>
                            <td valign="top"><strong>{{borrow_json.ls_value}}</strong></td>
                            <td width="150" valign="top">同盾审核结果：</td>
                            <td valign="top"><strong>{{borrow_json.fm_result}}</strong></td>
                            <td width="100" valign="top">审核资料：</td>
                            <td valign="top"><strong>{{borrow_json.ref_count}} 份</strong>
                                <a href="javascript:;" class="cueRed ml" onclick="goto_reference()" v-if="file_count === '0'">
                                    (点击查看)
                                </a>
                                <a href="javascript:;" class="cueRed ml" onclick="goto_reference()" v-else>
                                    （有{{file_count}}个新资料）
                                </a>
                            </td>
                        </tr>
                        <tr id="table_ZMXY">
                            <td valign="top">芝麻信用反欺诈查询1<input type="hidden" id="zmscore_num1" value="1"></td>
                            <td valign="top" v-if="zmxy_array1.count===0">
                                <strong>未查询</strong><a href="javascript:;" @click="curl_select_zmxy()" class="cueRed ml">（点击查询）</a>
                            </td>
                            <td v-else>
                                {{zmxy_array1.zmscore_score}}<a href="javascript:;" @click="delete_zmxy_score(zmxy_array1.zmscore_num)" class="cueRed ml">（点击删除）</a>
                            </td>
                            <td valign="top">芝麻信用反欺诈查询2</td>
                            <td valign="top" v-if="zmxy_array2.count===0">
                                <strong>未查询</strong><a href="javascript:;" @click="curl_select_zmxy()" class="cueRed ml">（点击查询）</a>
                            </td>
                            <td v-else>
                                {{zmxy_array2.zmscore_score}}<a href="javascript:;" @click="delete_zmxy_score(zmxy_array2.zmscore_num)" class="cueRed ml">（点击删除）</a>
                            </td>
                            <td valign="top">芝麻信用分</td>
                            <td valign="top" v-if="borrow_json.zhima_score==null">
                                未查询
                            </td>
                            <td valign="top" v-else>
                                {{borrow_json.zhima_score}}
                            </td>
                        </tr>
                        <tr id="table_SHZX"><td valign="top">上海资信查询</td>
                            <td valign="top"><a href="javascript:;" @click="select_vpn()" class="cueRed ml">（点击查询）</a></td>
                            <td valign="top">上海资信结果</td>
                            <td valign="top" v-if="shzx_array==null">
                                未查询
                            </td>
                            <td valign="top" v-else-if="shzx_array.state==1">
                                <a href="javascript:;" @click="look_vpn();" class="cueRed ml">（点击预览）</a>
                                <a href="javascript:;" @click="down_vpn();" class="cueRed ml">（点击下载）</a>
                            </td>
                            <td valign="top" v-else-if="shzx_array.state==2">
                                被查询人不存在
                            </td>
                            <td valign="top">合同文件</td>
                            <td valign="top" v-if="borrow_json.contract_annex==null">
                                未上传合同文件
                            </td>
                            <td v-else>
                                <input type="button" value="查看" class="btn" @click="down_load_file()">
                            </td>
                        </tr>
                    </table>
                </ul>
            </div>
            <div class="indexBox">
                <div class="boxTitle">分期审核操作</div>
                <ul>
                    <table width="100%" border="0" cellspacing="0" cellpadding="7" class="tableBasic">
                        <tr>
                            <td width="120" valign="top">初审审核：</td>
                            <td valign="top" v-if="borrow_json.borrow_stateid==6">
                                <input class="btn" type="button" value="通过" @click="first_examine();"></td>
                            <td valign="top" v-else-if="borrow_json.borrow_stateid==1">
                                等待初审
                            </td>
                            <td valign="top" v-else>
                                初审结束
                            </td>
                            <td width="150" valign="top">复审审核：</td>
                            <td valign="top" v-if="borrow_json.borrow_stateid==5||borrow_json.borrow_stateid==8">
                                <input class="btn" type="button" value="通过" id='check_period'
                                       @click="second_examine();">
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <input class="btn" type="button" value="不通过"
                                       @click="reject_examine();">
                            </td>
                            <td valign="top" v-else-if="borrow_json.borrow_stateid==1||borrow_json.borrow_stateid==6">
                                初审中
                            </td>
                            <td valign="top" v-else>
                                审核结束
                            </td>
                            <td width="100" valign="top">取消申请：</td>
                            <td valign="top" v-if="borrow_json.borrow_stateid!=4&&borrow_json.borrow_stateid!=3"><input class="btn" type="button" value="取消" @click="cancel_borrow()"></td>
                            <td valign="top" v-else></td>
                        </tr>
                        <tr>
                            <td width="120" valign="top">审核备注：</td>
                            <td valign="top"><input class="btn" type="button" value="新增" @click="add_borrow_remark();"></td>
                            <td width="150" valign="top">审核材料批量下载：</td>
                            <td valign="top"><input class="btn" type="button" value="下载" @click="file_zip()"></td>
                            <td width="100" valign="top">个人信息报表：</td>
                            <td valign="top" v-if="borrow_json.report_annex==null">
                                <input type='button' value='生成' class='btn' onclick='person_report();'/></td>
                            </td>
                            <td valign="top" v-else>
                                <input type='button' value='生成' class='btn' onclick='person_report();'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <input type='button' value='下载' class='btn' onclick='downloadfile();'/></td>
                            </td>
                        </tr>
                    </table>
                </ul>
            </div>
            <div style="margin:20px 0;"></div>
            <div class="easyui-tabs" data-options="tabWidth:245">
                <div title="审核备注" style="padding:10px">
                    <!-- <div style="margin:20px 0;"></div> -->
                    <table id="remark_table" style="width:100%;height:auto;"
                           data-options="
					rownumbers:true,
					singleSelect:true,
					autoRowHeight:false,
					pagination:true,
					nowrap:false,
					pageSize:10,toolbar:'#tb1'
			">
                        <thead>
                        <tr>
                            <th field="user_name" width="10%" align="center">操作人员</th>
                            <th field="content" width="55%"  align="left">内容</th>
                            <th field="create_time" width="20%" align="center">操作时间</th>
                            <th field="action" width="10%" align="center" formatter="formatAction">操作</th>
                        </tr>
                        </thead>
                    </table>
                </div>
                <div title="同盾返回结果" style="padding:10px">
                    <!-- <div style="margin:20px 0;"></div> -->
                    <table id="FM_table" style="width:100%;height:auto;"
                           data-options="
					rownumbers:true,
					singleSelect:true,
					autoRowHeight:false,
					pagination:true,
					pageSize:10,toolbar:'#tb2'
			">
                        <thead>
                        <tr>
                            <th field="decision" width="20%" align="center">结果</th>
                            <th field="rules_name" width="50%" align="center">规则名称</th>
                            <th field="score" width="20%" align="center">得分</th>
                        </tr>
                        </thead>
                    </table>
                </div>
                <div title="芝麻信用反欺诈查询1" style="padding:10px">
                    <!-- <div style="margin:20px 0;"></div> -->
                    <table id="ZMXY_table1" style="width:100%;height:auto;"
                           data-options="
					rownumbers:true,
					singleSelect:true,
					autoRowHeight:false,
					pagination:true,
					pageSize:10,toolbar:'#tb3'
			">
                        <thead>
                        <tr>
                            <th field="i" width="10%" align="center">序号</th>
                            <th field="zmrule_code" width="20%" align="center">code</th>
                            <th field="zmrule_rule" width="30%" align="center">description</th>
                            <th field="zmlevel_level" width="15%" align="center">风险等级</th>
                            <th field="update_time" width="10%" align="center">更新时间</th>
                        </tr>
                        </thead>
                    </table>
                </div>
                <div title="芝麻信用反欺诈查询2" style="padding:10px">
                    <!-- <div style="margin:20px 0;"></div> -->
                    <table id="ZMXY_table2" style="width:100%;height:auto;"
                           data-options="
					rownumbers:true,
					singleSelect:true,
					autoRowHeight:false,
					pagination:true,
					pageSize:10,toolbar:'#tb4'
			">
                        <thead>
                        <tr>
                            <th field="i" width="12%" align="center">序号</th>
                            <th field="zmrule_code" width="10%" align="center">code</th>
                            <th field="zmrule_rule" width="12%" align="center">description</th>
                            <th field="zmlevel_level" width="15%" align="center">风险等级</th>
                            <th field="update_time" width="10%" align="center">更新时间</th>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="clear"></div>
    <div class="clear"></div> </div>
</body>
<script type="text/javascript" src="__PUBLIC__/js/borrow/borrowapply_detail.js?a=12"></script>

</html>